{extend name="../../admin/view/main"}

{block name='content'}
<form action="{:sysuri()}?type={$get.type|default=''}" method="post" data-auto="true" class="layui-form layui-card">
    <div class="layui-card-body">

        <label class="layui-form-item relative block">
            <span class="help-label"><b>页面名称</b>Page Name</span>
            <input class="layui-input" name="name" placeholder="请输入页面名称" required
                   value='{$data.name|default=$base.name}'>
        </label>

        <div class="layui-form-item label-required-prev">
            <span class="help-label"><b>页面内容</b>Page Content</span>
            <textarea class="layui-hide" name="content">{$data.content|default=$base.content}</textarea>
        </div>

        <div class="hr-line-dashed"></div>
        <input type="hidden" name="type" value="{$get.type|default=''}">

        <div class="layui-form-item text-center">
            <button class="layui-btn" type="submit">保存数据</button>
            <button class="layui-btn layui-btn-danger" data-confirm="确定要取消编辑吗？" data-history-back type='button'>取消编辑
            </button>
        </div>

    </div>
</form>

<script>
    require(['ckeditor'], function () {
        window.createEditor('[name=content]', {height: 560});
    });
</script>
{/block}